<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>售后反馈</title>
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=3,minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <link href="../css/reset-html5.css" rel="stylesheet">
    <link href="../css/wx-main.css" rel="stylesheet">
    <link href="../css/mui.min.css" rel="stylesheet">
    <script src="../js/jquery-2.2.1.min.js"></script>
    <style>
        .btn_{
            margin-top: 15px;
            margin-bottom: 15px;
            color: #ffffff;
            text-align: center;
            padding: 10px 0;
            border-radius: 10px;
            width: 90%;
            margin-left: 5%;
        }
    </style>
</head>
<body>
<header class="text-color1">
        <span class="left-btn text-color2" onclick="history.go(-1)">
            返回
        </span>

</header>
<div class="row mui-input-row mar-top">
    <textarea id="question" class="mui-input-clear question" rows="6" placeholder="请详细描述您维修后出现的问题..."></textarea>

</div>
<div class="primary-bg btn_" id="btn">确认提交</div>
</body>
<script src="../js/base.js"></script>
<script src="../js/phone.js"></script>
<script src="layer_mobile/layer.js"></script>
<script>
    var url = "../index/index.php?m=Home&c=Order&a=after_sale";

    $('#btn').click(function(){
        var question = $('#question').val();
        if(question.length<4){
            alert('反馈问题字数不能少于4个字节');
            return false;
        }
        ajaxSend(question);
    });

    function ajaxSend(question){
		var index = layer.open({type: 2,shadeClose:false});
        $.post(url,{order_id:phone_getQueryString('order_id'),message:question},function(res){
            if(res.code==200){
                alert('反馈提交成功，正在跳转页面');
                setTimeout(function(){
                    history.go(-1);
                },2000)
            }else if(res.code==0){
                login();
            }else{
                alert(res.message);
            }
			layer.close(index);
        },'json');
    }
</script>
</html>